package com.huxun.service.Impl;

import com.huxun.bean.Food;
import com.huxun.mapper.FoodMapper;
import com.huxun.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FoodServiceImpl implements FoodService {
    @Autowired
    FoodMapper foodMapper;
    @Override
    public int totalCount(Food food) {
        return foodMapper.totalCount(food);
    }

    @Override
    public List<Food> getFoods(Map<String, Object> map) {
        return foodMapper.getFoods(map);
    }

    @Override
    public int addFood(Food food) {
        return foodMapper.addFood(food);
    }

    @Override
    public Food getById(int id) {
        return foodMapper.getById(id);
    }

    @Override
    public int updateFood(Food food) {
        return foodMapper.updateFood(food);
    }

    @Override
    public int deleteFood(int id) {
        return foodMapper.deleteFood(id);
    }

    @Override
    public int menu_totalCount(Map<String, Object> map) {
        return foodMapper.menu_totalCount(map);
    }


    @Override
    public List<Food> menu_getFoods(Map<String, Object> map) {
        return foodMapper.menu_getFoods(map);
    }
}
